package edu.cug.water.crawler.job.controller;

import edu.cug.water.crawler.common.utils.PageUtils;
import edu.cug.water.crawler.common.utils.R;
import edu.cug.water.crawler.job.service.ScheduleJobTimeTableService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/sys/schedule/timetable")
public class ScheduleJobTimeTableController {


    @Autowired
    ScheduleJobTimeTableService scheduleJobTimeTableService;

    @RequestMapping("/list")
    @RequiresPermissions("sys:schedule:timetable:list")
    public R list(@RequestParam Map<String, Object> params){
        PageUtils page = scheduleJobTimeTableService.queryPage(params);

        return R.ok().put("page", page);
    }
}
